$animator
( service in module ng
)
The $animator.create service provides the DOM manipulation API which is decorated with animations.
$animator(scope, attr);
scope – {Scope} –
the scope for the ng-animate.
attr – {Attributes} –
the attributes object which contains the ngAnimate key / value pair. (The attributes are
passed into the linking function of the directive using the $animator
.)
{object}
– the animator object which contains the enter, leave, move, show, hide and animate methods.
Globally enables/disables animations.
If(optional) – {Boolean=} –
provided then set the animation on or off.
{Boolean}
– Current animation state.
Injects the element object into the DOM (inside of the parent element) and then runs the enter animation.
element – {jQuery/jqLite element} –
the element that will be the focus of the enter animation
parent – {jQuery/jqLite element} –
the parent element of the element that will be the focus of the enter animation
after – {jQuery/jqLite element} –
the sibling element (which is the previous element) of the element that will be the focus of the enter animation
Starts the hide animation first and sets the CSS display
property to none
upon completion.
element – {jQuery/jqLite element} –
the element that will be rendered visible or hidden
Runs the leave animation operation and, upon completion, removes the element from the DOM.
element – {jQuery/jqLite element} –
the element that will be the focus of the leave animation
parent – {jQuery/jqLite element} –
the parent element of the element that will be the focus of the leave animation
Fires the move DOM operation. Just before the animation starts, the animator will either append it into the parent container or add the element directly after the after element if present. Then the move animation will be run.
element – {jQuery/jqLite element} –
the element that will be the focus of the move animation
parent – {jQuery/jqLite element} –
the parent element of the element that will be the focus of the move animation
after – {jQuery/jqLite element} –
the sibling element (which is the previous element) of the element that will be the focus of the move animation
Reveals the element by setting the CSS property display
to block
and then starts the show animation directly after.
element – {jQuery/jqLite element} –
the element that will be rendered visible or hidden